//package com.test.demo1.controller;
//
//import org.springframework.ai.chat.client.ChatClient;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//@RestController
//@RequestMapping("/ai")
//public class AiController {
//
//    private final ChatClient chatClient;
//
//    public AiController(ChatClient chatClient) {
//        this.chatClient = chatClient;
//    }
//
//    @GetMapping("/query")
//    public String handleQuery(@RequestParam String question) {
//        return chatClient.prompt()
//                .user(question)
//                .call()
//                .content();
//    }
//}
